1. Field
The present invention relates to a target-image detecting device that detects a target image as a part of photographed images and as an image of a target object from the photographed images, a control method and a control program of the target-image detecting device, a recording medium, and a digital camera.
2. Related Art
Conventionally, in order to provide a user interface that can be easily used and to automatically obtain an optimum image in an imaging device, a display device, and the like, there has been an increasing need for automatically recognizing a photographing target or a display target. As an example of such a need, there are functions of detecting a face image (target image) as an image of a face (target object) such as a person and an animal, adjusting the detected face image to obtain optimum focus and exposure, recognizing a character (target image), and automatically setting the recognized region as an object of OCR (Optical Character Recognition).
In such a technique of automatic recognition, there are cases of occurrence of erroneous recognition (erroneous detection), and occurrence of a temporary failure of recognition (detection).
For example, an image that is erroneously recognized is detected and not detected in some cases. In the encoding processing device described in Japanese Patent Unexamined Publication No. 2009-005239, even when a face region is detected in a certain frame, detection history of the face region detected in the concerned frame is decided as invalid when the face region is not continuously detected in a predetermined number or more of continuous frames after the concerned frame.
Further, an image of which recognition temporarily failed is thereafter continuously successfully recognized in many cases. The compartment-line recognizing device described in Japanese Patent Unexamined Publication No. 2013-003634 is for detecting an image (target image) of a compartment line from a photographed image of a road surface. Even when an image of the concerned compartment line is detected at less than a predetermined number of times, the compartment-line recognizing device makes the re-detection as firm when the image is continuously re-detected at a predetermined number of times. Accordingly, a compartment line that is once undetected can be properly re-detected.